
#ifndef WINDOW_H
#define WINDOW_H
#include <iostream>
#include <complex> // Temporarily
#include "ether.h"
#include <QDoubleSpinBox>
#include <QPushButton>
#include <QSlider>
#include <QWidget>
#include <QCoreApplication>
#include <QTime>
#include <QTableWidget>
#include <QDir>
#include <cmath>


QT_BEGIN_NAMESPACE
class QCheckBox;
class QComboBox;
class QLabel;
class QSpinBox;
QT_END_NAMESPACE
class RenderArea;

void delay(int msec);

//! [0]
class Window : public QWidget
{
    Q_OBJECT

public:
    Window();
    ~Window();

public slots:
    void setRobots();
    void updateTable();
    void simulate();
    void animate();
    void reloadData();
    void setOpenFileMap();
    void setOpenFileRobots();
    void setLogFile();
    void checkLog();
    void credits();
private:
  int anim;
  ether 		*Jungle;
  fstream 	FileMap;
  fstream 	FileRobots;
  fstream 	FileLog;
    char f_name [FILE_L];
    std::list<robot*> Robots;
    RenderArea *renderArea;
    
    
    QLabel *deltaTimeLabel;
    QLabel *currentTimeLabel;
    QDoubleSpinBox *deltaTimeSpinBox;
    QLabel *speedTimeLabel;
    QSlider *speedTimeSlider;
    QPushButton *simulatePushButton;
    QPushButton *animatePushButton;
    QPushButton *resetPushButton;
    QPushButton *creditsPushButton;
    QLabel *openFileMapLabel;
    QPushButton *openFileMapButton;
    QLabel *openFileRobotsLabel;
    QPushButton *openFileRobotsButton;
    QLabel *selectLogLabel;
    QCheckBox *logCheckBox;
    QPushButton *selectLogButton;
    QTableWidget *Table;
    QVector<QTableWidgetItem> robotPositions;
protected:  
  void closeEvent(QCloseEvent * event); 
};
//! [0]

#endif
